<?
require("config.php");

$location_status .= "| Enquire";
$show_backnav = "presscoverage_menu";
$menuname = NULL;
$menutarget = NULL;

if (NULL!=$action){

	$Query = "DELETE FROM $table WHERE id=$id";
	myQuery($Query);

   header("location:" . $rela_path . "share/msg.php?v=42");

   exit();

}else{

  if (!checkRecord($table,$id)){

	header("location:" . $rela_path . "share/msg.php?v=9002");

	exit();
  
  }

}


$Query = "SELECT 
code,
date,
subject, 
details,
picture,
publish,
settime,
online_date,
offline_date 
FROM $table WHERE id=$id LIMIT 1";

$r=myQuery($Query);

$Code=$r[0][0];
$Date=$r[0][1];
$Subject=$r[0][2];
$Details=$r[0][3];
$Picture=$r[0][4];
$Publish=$r[0][5];
$Settime=$r[0][6];
$Online_date=$r[0][7];
$Offline_date=$r[0][8];

if (!$header_file) $header_file = "inc/header.php";
if (!$footer_file) $footer_file = "inc/footer.php";

require($rela_path . $header_file);
?>
<form action="" method="post" enctype="multipart/form-data" name="form1">
<input name="action" type="hidden" value="delete">
<input name="id" type="hidden" value="<?print($id)?>">




<table width="95%" border="0" align="center">
  <tr> 
      <td valign="top"> <p>
          <br>
          <br>
        <table border="0" cellspacing="5" cellpadding="1">
          <tr> 
            <td class="tdheader">Code :</td>
            <td><?print($Code)?></td>
          </tr>
          <tr> 
            <td class="tdheader">Date :</td>
            <td><?print(OutDate($Date))?></td>
          </tr>
          <tr> 
            <td class="tdheader">Heading : </td>
            <td><?print($Subject)?></td>
          </tr>
          <tr>
            <td class="tdheader">Details :</td>
            <td><?loadImage2($Picture,$rela_path . $PIC_DIR. $table . "/")?><?print($Details)?></td>
          </tr>

          <tr> 
            <td class="tdheader">Publish : </td>
            <td><?print($Publish)?></td>
          </tr>

          <tr> 
            <td class="tdheader">Set Time : </td>
            <td><?if ($Settime) print("$Online_date - $Offline_date")?></td>
          </tr>
        </table>
        <p>&nbsp;
        <p>&nbsp; 
        <p>&nbsp; </td>

  </tr>
</table>
<br>
<br>
<br>


</form>
<?
require($rela_path . $footer_file);
?>
